//
//  NYWrongBottomTableCell.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/5.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYWrongBottomTableCell.h"
#import "NYWrongBottomTableCellModel.h"
@implementation NYWrongBottomTableCell

- (BOOL)shouldUpdateCellWithObject:(NYWrongBottomTableCellModel *)object
{
        if ( ![object isKindOfClass:[NYWrongBottomTableCellModel class]] ) {
                return NO;
        }
        [self updateContentWithObj:object];
        return YES;
}
+ (CGFloat)heightForObject:(NYWrongBottomTableCellModel *)object identifier:(NSString *)identifier atIndexPath:(NSIndexPath *)indexPath tableView:(UITableView *)tableView
{
        return tableView.height - __WGHeight(40);
}
- (void)updateContentWithObj:(NYWrongBottomTableCellModel *)obj
{
        if ([self.contentView.subviews containsObject:obj.commentContentView])
        {
                return;
        }
        [self.contentView addSubview:obj.commentContentView];
        [obj.commentContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.edges.equalTo(self.contentView);
        }];
}
@end
